const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

module.exports = {
    // ...
    resolve: {
        plugins: [new TsconfigPathsPlugin()],
        extensions: ['.ts', '.tsx', '.js', '.jsx'], // Ensure all relevant extensions are listed
        alias: {
            '@': path.resolve(__dirname, 'src/'), // 将 @ 映射到 src 目录
        },
    }
};